// 跟组织架构有关的接口
import request from '@/utils/request'

/*
获取组织列表 */
export function getDepartment() {
  return request({
    url: '/company/department'
  })
}
export function getManagerList() {
  return request({
    url: '/sys/user/simple'
  })
}
/* 新增组织 */
export function addDepartment(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}
/*
根据id获取部门详情
*/
export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
/** *
 * 更新部门
 * ***/
export function updateDepartment(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
